﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using NotebookWSA.Sales;

namespace NotebookWSA
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class NotebookWSA : System.Web.Services.WebService
    {

        
        [WebMethod]
        public void AddOrder(OrderUnit oUnit)
        {
            OrderManager oManager = new OrderManager();

            oManager.ConnectionString = "Server=sqlsvr;Database=DB_BIOCARE;User Id=sa;Password=nidaros;";
            oManager.Open();

            oManager.AddOrder(oUnit);

            oManager.Close();
            
        }

        [WebMethod]
        public void UpdateOrder(OrderUnit oUnit)
        {
            OrderManager oManager = new OrderManager();

            oManager.ConnectionString = "Server=sqlsvr;Database=DB_BIOCARE;User Id=sa;Password=nidaros;";
            oManager.Open();
            oManager.UpdateOrder(oUnit);
            oManager.Close();
        }
    }
}